<!doctype html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <title>安置帮教管理--修改</title>
    <script src="/webjars/miniui/boot.js" type="text/javascript"></script>
    <link href="/static/css/resource.css" rel="stylesheet" type="text/css"/>
    <script src="/static/js/common/common.js" type="text/javascript"></script>
    <link href="/webjars/miniui/css/demo.css" rel="stylesheet" type="text/css"/>
    <link href="/static/css/default.css" rel="stylesheet" type="text/css"/>
    <link href="/webjars/miniui/frame/tabs.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div class="mini-toolbar" style="padding:2px;" align="right" >
    <input name="priNum" id="priNum" class="mini-hidden" style="width: 100%" readonly/>
</div>
<div class="mini-tabs" style="width:100%;height: 100%" id="tabs" onbeforeactivechanged="onClickTo(e)" plain="false">
    <div title="帮教小组"  style="height: 100%;width: 100%"></div>
    <div title="安置"  style="height: 100%;width: 100%" ></div>
    <div title="救助"  id="dmtxx" style="height: 100%;width: 100%" ></div>
    <div title="帮扶"  style="height: 100%;width: 100%" ></div>

</div>

<script type="text/javascript">
    mini.parse();
    var priNum = mini.get("priNum");
    var tabs = mini.get("tabs");

    function getMainValue(data){
        id.setValue(data.id);
        priNum.setValue(data.priNum);
    }

    function setChildValue(e){
        return {id : id.getValue(),priNum: priNum.getValue()};
    }

    function onClickTo(e) {
        var pristr = priNum.getValue();
        var tabName = e.tab.title;
        if("救助" == tabName){
            e.tab.url = "/azbj/azbjgl/bjgzgl/view/toSuccourTab?priNum="+pristr;
        }else if("帮扶" == tabName){
            e.tab.url = "/azbj/azbjgl/bjgzgl/view/toHelpTab?priNum="+pristr;
        }else if("安置" == tabName){
            e.tab.url = "/azbj/azbjgl/azgzgl/view/toAzInfoTab?priNum="+pristr;
        }else if("帮教小组" == tabName){
            e.tab.url = "/azbj/bjdxInfo/qbrygl/toSetBjxz/view?priNum="+pristr;
        }
    }

    function setChildValue(e){
        return {id : id.getValue(),priNum: priNum.getValue()};
    }
    function initTab(t){
        if(t==0){
            tabs.activeTab(0);
            // 帮教小组
            tabs.loadTab ("/azbj/bjdxInfo/qbrygl/toSetBjxz/view?priNum="+'${priNum!''}');

        }else if(t==1){
            tabs.activeTab(1);
            // 安置
            tabs.loadTab ("/azbj/azbjgl/azgzgl/view/toAzInfoTab?priNum="+'${priNum!''}');
        }
        else if(t==2){
            tabs.activeTab(2);
            // 救助
            tabs.loadTab ("/azbj/azbjgl/bjgzgl/view/toSuccourTab?priNum="+'${priNum!''}');
        }else if(t==3){
            tabs.activeTab(3);
            // 帮扶
            tabs.loadTab ("/azbj/azbjgl/bjgzgl/view/toHelpTab?priNum="+'${priNum!''}');
        }
    }

    window.onload = function (ev) {
        priNum.setValue('${priNum!''}');
        initTab(${tabType!''});
    }
</script>
</body>
</html>